home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / prg_basi / agavb25.zip / VB.ZIP / GCAPTION.FRM < prev    next >
Text File  |  1996-01-16  |  15KB  |  499 lines

  1. VERSION 2.00
  2. Begin Form CaptionDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Captions"
  6.    ClientHeight    =   3555
  7.    ClientLeft      =   1560
  8.    ClientTop       =   1470
  9.    ClientWidth     =   7635
  10.    Height          =   3960
  11.    Left            =   1500
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3555
  17.    ScaleWidth      =   7635
  18.    Top             =   1125
  19.    Width           =   7755
  20.    Begin Frame Frame4 
  21.       BackColor       =   &H00C0C0C0&
  22.       Caption         =   "Caption Positions"
  23.       FontBold        =   -1  'True
  24.       FontItalic      =   0   'False
  25.       FontName        =   "System"
  26.       FontSize        =   9.75
  27.       FontStrikethru  =   0   'False
  28.       FontUnderline   =   0   'False
  29.       Height          =   975
  30.       Left            =   3630
  31.       TabIndex        =   26
  32.       Top             =   1875
  33.       Width           =   3840
  34.       Begin HScrollBar HScroll1 
  35.          Height          =   240
  36.          Index           =   0
  37.          Left            =   1125
  38.          Max             =   140
  39.          Min             =   -140
  40.          TabIndex        =   28
  41.          Top             =   330
  42.          Width           =   2000
  43.       End
  44.       Begin HScrollBar HScroll1 
  45.          Height          =   240
  46.          Index           =   1
  47.          Left            =   1125
  48.          Max             =   140
  49.          Min             =   -140
  50.          TabIndex        =   27
  51.          Top             =   570
  52.          Width           =   2000
  53.       End
  54.       Begin Label Label2 
  55.          AutoSize        =   -1  'True
  56.          BackStyle       =   0  'Transparent
  57.          Caption         =   "0"
  58.          Height          =   195
  59.          Index           =   0
  60.          Left            =   3225
  61.          TabIndex        =   5
  62.          Top             =   360
  63.          Width           =   120
  64.       End
  65.       Begin Label Label1 
  66.          Alignment       =   1  'Right Justify
  67.          AutoSize        =   -1  'True
  68.          BackStyle       =   0  'Transparent
  69.          Caption         =   "CaptionX:"
  70.          FontBold        =   0   'False
  71.          FontItalic      =   0   'False
  72.          FontName        =   "Arial"
  73.          FontSize        =   8.25
  74.          FontStrikethru  =   0   'False
  75.          FontUnderline   =   0   'False
  76.          Height          =   210
  77.          Index           =   0
  78.          Left            =   390
  79.          TabIndex        =   9
  80.          Top             =   345
  81.          Width           =   690
  82.       End
  83.       Begin Label Label1 
  84.          Alignment       =   1  'Right Justify
  85.          AutoSize        =   -1  'True
  86.          BackStyle       =   0  'Transparent
  87.          Caption         =   "CaptionY:"
  88.          FontBold        =   0   'False
  89.          FontItalic      =   0   'False
  90.          FontName        =   "Arial"
  91.          FontSize        =   8.25
  92.          FontStrikethru  =   0   'False
  93.          FontUnderline   =   0   'False
  94.          Height          =   210
  95.          Index           =   1
  96.          Left            =   375
  97.          TabIndex        =   11
  98.          Top             =   600
  99.          Width           =   705
  100.       End
  101.       Begin Label Label2 
  102.          AutoSize        =   -1  'True
  103.          BackStyle       =   0  'Transparent
  104.          Caption         =   "0"
  105.          Height          =   195
  106.          Index           =   1
  107.          Left            =   3225
  108.          TabIndex        =   16
  109.          Top             =   600
  110.          Width           =   120
  111.       End
  112.    End
  113.    Begin Frame Frame2 
  114.       BackColor       =   &H00C0C0C0&
  115.       Caption         =   "Caption Font ID"
  116.       FontBold        =   -1  'True
  117.       FontItalic      =   0   'False
  118.       FontName        =   "System"
  119.       FontSize        =   9.75
  120.       FontStrikethru  =   0   'False
  121.       FontUnderline   =   0   'False
  122.       Height          =   1095
  123.       Left            =   4905
  124.       TabIndex        =   22
  125.       Top             =   45
  126.       Width           =   2550
  127.       Begin OptionButton Option2 
  128.          BackColor       =   &H00C0C0C0&
  129.          Caption         =   "MS Sans Serif (FontID=2)"
  130.          FontBold        =   0   'False
  131.          FontItalic      =   0   'False
  132.          FontName        =   "MS Sans Serif"
  133.          FontSize        =   8.25
  134.          FontStrikethru  =   0   'False
  135.          FontUnderline   =   0   'False
  136.          Height          =   240
  137.          Index           =   2
  138.          Left            =   90
  139.          TabIndex        =   23
  140.          Top             =   765
  141.          Width           =   2235
  142.       End
  143.       Begin OptionButton Option2 
  144.          BackColor       =   &H00C0C0C0&
  145.          Caption         =   "Courier(FontID=1)"
  146.          FontBold        =   0   'False
  147.          FontItalic      =   0   'False
  148.          FontName        =   "Courier New"
  149.          FontSize        =   8.25
  150.          FontStrikethru  =   0   'False
  151.          FontUnderline   =   0   'False
  152.          Height          =   225
  153.          Index           =   1
  154.          Left            =   90
  155.          TabIndex        =   24
  156.          Top             =   555
  157.          Width           =   2235
  158.       End
  159.       Begin OptionButton Option2 
  160.          BackColor       =   &H00C0C0C0&
  161.          Caption         =   "Arial (FontID=0)"
  162.          FontBold        =   0   'False
  163.          FontItalic      =   0   'False
  164.          FontName        =   "Arial"
  165.          FontSize        =   8.25
  166.          FontStrikethru  =   0   'False
  167.          FontUnderline   =   0   'False
  168.          Height          =   240
  169.          Index           =   0
  170.          Left            =   90
  171.          TabIndex        =   25
  172.          Top             =   345
  173.          Width           =   1770
  174.       End
  175.    End
  176.    Begin AGAUGE Gauge1 
  177.       Angle           =   0
  178.       AutoRedraw      =   -1  'True
  179.       AVersion        =   2.5
  180.       BackgroundColor =   &H00E0E0E0&
  181.       BevelInner      =   0  ' 0 - None
  182.       BevelOuter      =   1  ' 1 - Raised
  183.       BevelWidth      =   2
  184.       BorderType      =   1  ' 1 - Bevel
  185.       BorderWidth     =   0
  186.       FontID          =   2
  187.       FrameColor      =   &H00000000&
  188.       FrameScaleX     =   0
  189.       FrameScaleY     =   0
  190.       FrameStyle      =   0  ' 0 - None
  191.       Height          =   3315
  192.       Left            =   135
  193.       MouseControl    =   -1  'True
  194.       OutlineAlign    =   0  ' 0 - Left 
  195.       OutlineColor    =   &H00000000&
  196.       OutlineTitle    =   ""
  197.       OutlineWidth    =   0
  198.       Radius          =   0
  199.       Shape           =   ""
  200.       TabIndex        =   21
  201.       Top             =   105
  202.       Value           =   0
  203.       Width           =   3405
  204.       XScale          =   0
  205.       YScale          =   0
  206.       ZLoad           =   GCAPTION.FRX:0000
  207.    End
  208.    Begin Frame Frame3 
  209.       BackColor       =   &H00C0C0C0&
  210.       Caption         =   "Caption Color"
  211.       FontBold        =   -1  'True
  212.       FontItalic      =   0   'False
  213.       FontName        =   "System"
  214.       FontSize        =   9.75
  215.       FontStrikethru  =   0   'False
  216.       FontUnderline   =   0   'False
  217.       Height          =   630
  218.       Left            =   3630
  219.       TabIndex        =   4
  220.       Top             =   1170
  221.       Width           =   3840
  222.       Begin Label Colors 
  223.          BackColor       =   &H00000000&
  224.          Height          =   225
  225.          Index           =   0
  226.          Left            =   660
  227.          TabIndex        =   6
  228.          Top             =   300
  229.          Width           =   225
  230.       End
  231.       Begin Label Colors 
  232.          BackColor       =   &H000000FF&
  233.          Height          =   225
  234.          Index           =   1
  235.          Left            =   1545
  236.          TabIndex        =   7
  237.          Top             =   300
  238.          Width           =   225
  239.       End
  240.       Begin Label Colors 
  241.          BackColor       =   &H00C00000&
  242.          Height          =   225
  243.          Index           =   2
  244.          Left            =   945
  245.          TabIndex        =   13
  246.          Top             =   300
  247.          Width           =   225
  248.       End
  249.       Begin Label Colors 
  250.          BackColor       =   &H00404040&
  251.          Height          =   225
  252.          Index           =   3
  253.          Left            =   1830
  254.          TabIndex        =   14
  255.          Top             =   300
  256.          Width           =   225
  257.       End
  258.       Begin Label Colors 
  259.          BackColor       =   &H0000FF00&
  260.          Height          =   225
  261.          Index           =   4
  262.          Left            =   1245
  263.          TabIndex        =   15
  264.          Top             =   300
  265.          Width           =   225
  266.       End
  267.       Begin Label Colors 
  268.          BackColor       =   &H0000FFFF&
  269.          Height          =   225
  270.          Index           =   5
  271.          Left            =   2130
  272.          TabIndex        =   17
  273.          Top             =   300
  274.          Width           =   225
  275.       End
  276.       Begin Label Colors 
  277.          BackColor       =   &H00FFFF00&
  278.          Height          =   225
  279.          Index           =   6
  280.          Left            =   2430
  281.          TabIndex        =   18
  282.          Top             =   300
  283.          Width           =   225
  284.       End
  285.       Begin Label Colors 
  286.          BackColor       =   &H00800080&
  287.          Height          =   225
  288.          Index           =   7
  289.          Left            =   2715
  290.          TabIndex        =   19
  291.          Top             =   300
  292.          Width           =   225
  293.       End
  294.       Begin Label Colors 
  295.          BackColor       =   &H000080FF&
  296.          Height          =   225
  297.          Index           =   8
  298.          Left            =   3015
  299.          TabIndex        =   20
  300.          Top             =   300
  301.          Width           =   225
  302.       End
  303.    End
  304.    Begin TextBox Text1 
  305.       FontBold        =   -1  'True
  306.       FontItalic      =   0   'False
  307.       FontName        =   "System"
  308.       FontSize        =   9.75
  309.       FontStrikethru  =   0   'False
  310.       FontUnderline   =   0   'False
  311.       Height          =   360
  312.       Left            =   3630
  313.       TabIndex        =   10
  314.       Text            =   " "
  315.       Top             =   3105
  316.       Width           =   3840
  317.    End
  318.    Begin Frame Frame1 
  319.       BackColor       =   &H00C0C0C0&
  320.       Caption         =   "Caption ID"
  321.       FontBold        =   -1  'True
  322.       FontItalic      =   0   'False
  323.       FontName        =   "System"
  324.       FontSize        =   9.75
  325.       FontStrikethru  =   0   'False
  326.       FontUnderline   =   0   'False
  327.       Height          =   1095
  328.       Left            =   3645
  329.       TabIndex        =   0
  330.       Top             =   30
  331.       Width           =   1125
  332.       Begin OptionButton Option1 
  333.          BackColor       =   &H00C0C0C0&
  334.          Caption         =   "2"
  335.          FontBold        =   -1  'True
  336.          FontItalic      =   0   'False
  337.          FontName        =   "System"
  338.          FontSize        =   9.75
  339.          FontStrikethru  =   0   'False
  340.          FontUnderline   =   0   'False
  341.          Height          =   255
  342.          Index           =   2
  343.          Left            =   360
  344.          TabIndex        =   3
  345.          Top             =   780
  346.          Width           =   615
  347.       End
  348.       Begin OptionButton Option1 
  349.          BackColor       =   &H00C0C0C0&
  350.          Caption         =   "1"
  351.          FontBold        =   -1  'True
  352.          FontItalic      =   0   'False
  353.          FontName        =   "System"
  354.          FontSize        =   9.75
  355.          FontStrikethru  =   0   'False
  356.          FontUnderline   =   0   'False
  357.          Height          =   255
  358.          Index           =   1
  359.          Left            =   360
  360.          TabIndex        =   2
  361.          Top             =   540
  362.          Width           =   615
  363.       End
  364.       Begin OptionButton Option1 
  365.          BackColor       =   &H00C0C0C0&
  366.          Caption         =   "0"
  367.          FontBold        =   -1  'True
  368.          FontItalic      =   0   'False
  369.          FontName        =   "System"
  370.          FontSize        =   9.75
  371.          FontStrikethru  =   0   'False
  372.          FontUnderline   =   0   'False
  373.          Height          =   255
  374.          Index           =   0
  375.          Left            =   360
  376.          TabIndex        =   1
  377.          Top             =   300
  378.          Value           =   -1  'True
  379.          Width           =   615
  380.       End
  381.    End
  382.    Begin Label Label1 
  383.       AutoSize        =   -1  'True
  384.       BackStyle       =   0  'Transparent
  385.       Caption         =   "Caption "
  386.       Height          =   240
  387.       Index           =   2
  388.       Left            =   3630
  389.       TabIndex        =   8
  390.       Top             =   2880
  391.       Width           =   720
  392.    End
  393.    Begin Label Label2 
  394.       Alignment       =   2  'Center
  395.       AutoSize        =   -1  'True
  396.       BackStyle       =   0  'Transparent
  397.       Caption         =   " "
  398.       Height          =   195
  399.       Index           =   2
  400.       Left            =   5460
  401.       TabIndex        =   12
  402.       Top             =   3030
  403.       Width           =   90
  404.    End
  405. End
  406. Dim colorid(9) As Integer
  407.  
  408. Sub Colors_Click (index As Integer)
  409.  
  410.     Gauge1.CaptionColor = colors(index).BackColor
  411.     text1.ForeColor = Gauge1.CaptionColor
  412.     colorid(Gauge1.CaptionID) = index
  413.  
  414.     For i = 0 To 8
  415.         If i = index Then
  416.             colors(i).BorderStyle = 1
  417.         Else
  418.             colors(i).BorderStyle = 0
  419.         End If
  420.     Next i
  421.  
  422. End Sub
  423.  
  424. Sub Form_Load ()
  425.  
  426.     hscroll1(0) = Gauge1.CaptionX * 100
  427.     hscroll1(1) = Gauge1.CaptionY * 100
  428.     text1 = Gauge1.Caption
  429.     Option2(Gauge1.CaptionFontID) = True
  430.  
  431.     For i = 0 To 2
  432.         Gauge1.CaptionID = i
  433.         Gauge1.CaptionColor = colors(i).BackColor
  434.         colorid(i) = i
  435.     Next i
  436.     Gauge1.CaptionID = 0
  437.  
  438.  
  439. End Sub
  440.  
  441. Sub HScroll1_Change (index As Integer)
  442.  
  443.     Select Case index
  444.         Case 0
  445.             Gauge1.CaptionX = hscroll1(0) / 100
  446.             label2(0) = hscroll1(0) / 100
  447.         Case 1
  448.             Gauge1.CaptionY = hscroll1(1) / 100
  449.             label2(1) = hscroll1(1) / 100
  450.     End Select
  451.  
  452. End Sub
  453.  
  454. Sub HScroll1_Scroll (index As Integer)
  455.  
  456.     Select Case index
  457.         Case 0
  458.             Gauge1.CaptionX = hscroll1(0) / 100
  459.             label2(0) = hscroll1(0) / 100
  460.         Case 1
  461.             Gauge1.CaptionY = hscroll1(1) / 100
  462.             label2(1) = hscroll1(1) / 100
  463.     End Select
  464.  
  465. End Sub
  466.  
  467. Sub Option1_Click (index As Integer)
  468.  
  469.     Gauge1.CaptionID = index
  470.     hscroll1(0) = Gauge1.CaptionX * 100
  471.     hscroll1(1) = Gauge1.CaptionY * 100
  472.     text1 = Gauge1.Caption
  473.     text1.ForeColor = Gauge1.CaptionColor
  474.     
  475.     Option2(Gauge1.CaptionFontID) = True
  476.  
  477.     For i = 0 To 8
  478.         If i = colorid(index) Then
  479.             colors(i).BorderStyle = 1
  480.         Else
  481.             colors(i).BorderStyle = 0
  482.         End If
  483.     Next i
  484.  
  485. End Sub
  486.  
  487. Sub Option2_Click (index As Integer)
  488.     
  489.     Gauge1.CaptionFontID = index
  490.  
  491. End Sub
  492.  
  493. Sub Text1_Change ()
  494.  
  495.     Gauge1.Caption = text1
  496.  
  497. End Sub
  498.  
  499.